package malaria_acd;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import project.malaria.malaria_acd.R;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.app.Activity;
import android.content.Intent;

public class SyncActivity extends Activity {
	@Override
	protected void onCreate(  Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sync_main);
	}
	
	public void funcConfig(View v) {
		funcConfig();
	}
	
	public void funcConfig() {
		Intent intent = new Intent(this, ConfigActivity.class);
		finish();
		startActivityForResult(intent, 0);
	}
	
	public void funcBack(View v) {
		funcBack();
	}
	
	public void funcBack() {
		Intent intent = new Intent(this, MainActivity.class);
		finish();
		startActivityForResult(intent, 0);
	}
	
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			funcBack();
			return true;
		}
		return false;
	}
	/*
	public void funcSynData(View v){
		List<String> list_url = new ArrayList();
		List<String> list_method = new ArrayList();
		String method_getData = "";
		
		for(int i =1;i<20;i++){
			list_url.add("http://www.biophics.org/malariar10/json_pho_mobile_report.php?func_id=bcc&pageat="+i+"&pv_id="+pv);
			method_getData = (i==1)?"bccFirst":"bcc";
			list_method.add(method_getData);
		}
		for(int i =1;i<20;i++){
			list_url.add("http://www.biophics.org/malariar10/json_pho_mobile_report.php?func_id=vc&pageat="+i+"&pv_id="+pv);
			method_getData = (i==1)?"vcFirst":"vc";
			list_method.add(method_getData);
		}
		for(int i =1;i<20;i++){
			list_url.add("http://www.biophics.org/malariar10/json_pho_mobile_report.php?func_id=mp7&pageat="+i+"&pv_id="+pv);
			method_getData = (i==1)?"mp7First":"mp7";
			list_method.add(method_getData);
		}
		
		
		list_url.add("http://www.biophics.org/malariar10/json_pho_mobile_report.php?func_id=date&pv_id="+pv);
		list_method.add("date");
		
		
		HashMap hm_data = new HashMap();
		hm_data.put("url", list_url);
		hm_data.put("method", list_method);
		
		//System.out.println("callurl ");
		CallURLGetData call = new CallURLGetData(this,hm_data);
		call.execute();
	
	}
	*/
	
}